package com.lc.index.service.impl;


import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.lc.index.mapper.ChefMapper;
import com.lc.index.domain.Chef;
import com.lc.index.service.ChefService;

/**
 * 存储厨师基本信息Service业务层处理
 * 
 * @author autoGen
 * @date 2025-03-12
 */
@Service
public class ChefServiceImpl extends ServiceImpl<ChefMapper, Chef> implements ChefService
{

    @Override
    public List<Chef> getChefList() {
        LambdaQueryWrapper<Chef> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.select(Chef::getId,
                Chef::getChefName,
                Chef::getPhone,
                Chef::getAvatar,
                Chef::getAvgRating,
                Chef::getProportion,
                Chef::getStatus);
        return baseMapper.selectList(queryWrapper);
    }

    @Override
    public Chef getChefById(Integer chefId) {
        return baseMapper.selectById(chefId);
    }
}
